@extends('admin.layouts.layout')
@section('content')
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-title">
                <h5>编辑服务器</h5>
            </div>
            <div class="ibox-content">
                <a class="menuid btn btn-primary btn-sm" href="{{getBackUrl()}}">返回</a>
                <div class="hr-line-dashed m-t-sm m-b-sm"></div>
                <form class="form-horizontal m-t-md" action="{{ route('servers.update',$server->id) }}" method="post"
                      accept-charset="UTF-8" enctype="multipart/form-data">
                    {!! csrf_field() !!}
                    {{method_field('PATCH')}}
                    <input type="hidden" name="goBackUrl" value="{{getBackUrl()}}"/>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">游戏：</label>
                        <div class="input-group col-sm-2">
                            <p class="form-control-static">{{$server->game_name}}</p>
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">渠道：</label>
                        <div class="input-group col-sm-2">
                            <p class="form-control-static">{{$server->channel_name}}</p>
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">子渠道：</label>
                        <div class="input-group col-sm-2">
                            <p class="form-control-static">{{$server->sub_channel_name}}</p>
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">服务器Id：</label>
                        <div class="input-group col-sm-2">
                            <p class="form-control-static">{{$server->server_id}}</p>
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">服务器名称：</label>
                        <div class="input-group col-sm-2">
                            <input type="text" class="form-control" name="server_name" value="{{$server->server_name}}"
                                   required data-msg-required="请输入渠道名称" autocomplete="off">
                            @if ($errors->has('server_name'))
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>{{$errors->first('server_name')}}</span>
                            @endif
                        </div>
                    </div>
                    <div class="hr-line-dashed m-t-sm m-b-sm"></div>

                    <div class="form-group">
                        <div class="col-sm-12 col-sm-offset-2">
                            <button class="btn btn-primary" type="submit"><i class="fa fa-check"></i>&nbsp;保 存</button>
                            　
                            <button class="btn btn-white" type="reset"><i class="fa fa-repeat"></i> 重 置</button>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </form>
            </div>
        </div>
    </div>
@endsection